home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr14 / tetris_d.zip / TETRIS.BAT < prev    next >
DOS Batch File  |  1993-06-25  |  4KB  |  128 lines

  1. @Goto Start
  2.  
  3.                              ___________________
  4.  
  5.                                 TETRIS DELUXE
  6.                              ___________________
  7.  
  8.  
  9. If you are smart enough to view this batch file, you are probably smart enough
  10. to run the real executable file.  However, please do not do this.  The game
  11. assumes the presense of an EGA display, and further assumes that the vertical
  12. retrace signal is not trapped by, say, Microsoft Windows.
  13.  
  14. After verifying that MS-Windows is not running, this batch file coaxes your VGA
  15. into EGA emulation mode with the little foofoo program MODE_EGA.COM.  When the
  16. game is finished running, VGA native mode is restored with opposite program
  17. MODE_VGA.COM.  (If you have a real EGA, the mode switching programs will pose
  18. no threat.)
  19.  
  20. For the curious, EGA mode is necessary on a VGA because EGA text mode uses
  21. 8-pixel wide characters, while VGA text modes use 9-pixel wide chracters.  Why
  22. does that matter?  Because the game runs in 80x25 text mode with a custom
  23. character set to simulate shaded blocks.  It's pretty neat, really.  The EGA's
  24. 8x14 character cells work really super neato with custom-defined characters,
  25. but the VGA's 9x14 cells do not, as the 9th column is either blank or a repeat
  26. of the 8th column.  Pretty broken if you ask me.  Anyway...
  27.  
  28. The reason the actual executable file is named TETRIS.XEX is to keep dumb
  29. users (I assume you are a smart user) from running it directly, which could
  30. cause strange results.  The file is renamed here on the fly to TETRIS.EXE and
  31. back to TETRIS.XEX after the program exits.
  32.  
  33.                                                                        --TSL
  34.  
  35. _______________________________________________________________________________
  36.  
  37.  
  38. :Start
  39. @Echo Off
  40.  
  41. If Exist TETRIS_.EXE Ren TETRIS_.EXE TETRIS.XEX
  42.  
  43.  
  44. :Components
  45.  
  46.    If not Exist  README.COM    Echo Component file README.COM is missing!
  47.    If not Exist  TETRIS.DOC    Echo Component file TETRIS.DOC is missing!
  48.    If not Exist  TETRIS.BAT    Echo Component file TETRIS.BAT is missing!
  49.    If not Exist  TETRIS.FNT    Echo Component file TETRIS.FNT is missing!
  50.    If not Exist  TETRIS.SCR    Echo Component file TETRIS.SCR is missing!
  51.    If not Exist  TETRIS.XEX    Echo Component file TETRIS.XEX is missing!
  52.    If not Exist  MODE_EGA.COM  Echo Component file MODE_EGA.COM is missing!
  53.    If not Exist  MODE_VGA.COM  Echo Component file MODE_VGA.COM is missing!
  54.    If not Exist  WINCHECK.COM  Echo Component file WINCHECK.COM is missing!
  55.  
  56.    If not Exist  README.COM    Goto End
  57.    If not Exist  TETRIS.DOC    Goto End
  58.    If not Exist  TETRIS.FNT    Goto End
  59.    If not Exist  TETRIS.SCR    Goto End
  60.    If not Exist  TETRIS.XEX    Goto End
  61.    If not Exist  MODE_EGA.COM  Goto End
  62.    If not Exist  MODE_VGA.COM  Goto End
  63.    If not Exist  WINCHECK.COM  Goto End
  64.  
  65.  
  66. :WinCheck
  67.  
  68.    WINCHECK
  69.  
  70.    If not ErrorLevel 1 Goto ReadMe
  71.  
  72.       Cls
  73.       Echo.
  74.       Echo Sorry, this program will not run reliably under Windows.
  75.       Echo Please exit to DOS and try again.
  76.       Echo.
  77.  
  78.       Goto End
  79.  
  80.  
  81. :ReadMe
  82.  
  83.    If Exist README.CFG Goto Run
  84.  
  85.       Cls
  86.       Echo.
  87.       Echo You have not yet viewed the Tetris README file.  In a moment it will
  88.       Echo automatically be displayed on your screen for your perusal.  You may
  89.       Echo use the arrow keys to motor up and down through the file.  Home, End,
  90.       Echo PageUp, PageDown, + and - are also available.  You can press Esc at
  91.       Echo any time to exit the viewer.
  92.       Echo.
  93.       Echo.
  94.       Pause
  95.       README.COM TETRIS.DOC
  96.       Cls
  97.       Echo.
  98.       Echo If you ever need to get back to the README file, just type "README"
  99.       Echo at the DOS prompt from this directory.
  100.       Echo.
  101.       Echo Now that you have viewed the README file (and hopefully read it),
  102.       Echo you are prepared to run the game!
  103.       Echo.
  104.       Echo.
  105.       Pause
  106.  
  107.       Goto Run
  108.  
  109.  
  110. :Run
  111.  
  112.    MODE_EGA
  113.    Ren TETRIS.XEX TETRIS_.EXE >Nul
  114.    TETRIS_.EXE
  115.    Ren TETRIS_.EXE TETRIS.XEX >Nul
  116.    MODE_VGA
  117.  
  118.    Cls
  119.    Echo.
  120.    Echo.
  121.    Echo Tank smudge for playing!
  122.    Echo.
  123.    Echo.
  124.  
  125.  
  126. :End
  127.  
  128.